package com.xingfudazi.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xingfudazi.app.domain.AppActSign;
import com.xingfudazi.app.mapper.AppActSignMapper;
import com.xingfudazi.app.service.IAppActSignService;
import org.springframework.stereotype.Service;

import java.awt.*;
import java.util.List;

/**
 * @author YuJiaMing
 * date 2024年09月20日 00:52
 */
@Service
public class AppActSignServiceImpl extends ServiceImpl<AppActSignMapper, AppActSign> implements IAppActSignService {
    @Override
    public List<AppActSign> selectList(AppActSign appActSign) {
        LambdaQueryWrapper<AppActSign> wrapper = new LambdaQueryWrapper<>();
        wrapper.orderByDesc(AppActSign::getCreateTime);

        // 活动id
        wrapper.eq(appActSign.getActId() != null, AppActSign::getActId, appActSign.getActId());
        wrapper.eq(appActSign.getNid() != null, AppActSign::getNid, appActSign.getNid());
        return list(wrapper);
    }
}
